<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg"%>
<%
	String path=request.getContextPath();
	String basePath=request.getScheme()+"://"
			+request.getServerName()+":"+request.getServerPort()
			+path+"/";
%>
<!DOCTYPE html>
<html>
<base href="<%=basePath%>">
<head>
	<title>${problem.getProblemId() }.${problem.getProblemTitle() }</title>
	<meta charset="utf-8">
	<link rel="icon" href="img/logo.png" sizes="32x32">
	<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
	<link rel="stylesheet" type="text/css" href="css/problem.css">
	<link rel="stylesheet" href="styles/default.css">
	<script type="text/javascript" src="js/jquery.min.js"></script>
	<script type="text/javascript" src="js/popper.min.js"></script>
	<script type="text/javascript" src="js/bootstrap.js"></script>
	<script src="js/highlight.pack.js"></script>
	<script src="layui/layui.js"></script>
	<style type="text/css">
		.img-circle{
			border-radius: 50%;
		}
		.label-info {
		    background-color: #5bc0de;
		}
		.label {
		    display: inline;
		    padding: .2em .6em .3em;
		    line-height: 1;
		    color: #fff;
		    text-align: center;
		    white-space: nowrap;
		    vertical-align: baseline;
		    border-radius: .25em;
		}
		.label-info[href]:focus, .label-info[href]:hover {
		    background-color: #31b0d5;
		}
		.file-comment {
		    width: 100%;
		    padding: .78571429em 1em;
		    border: 1px solid rgba(34,36,38,.15);
		    resize: vertical;
		    color: rgba(0,0,0,.87);
		    box-shadow: 0 0 0 0 transparent inset;
		    transition: color .1s ease,border-color .1s ease;
		    font-size: 1em;
		    line-height: 1.2857;
		    border-radius: 4px;
		    white-space: pre-wrap;
		    overflow-wrap: break-word;
		}
		.comment-title {
		    color: #999999;
		    font-size: 13px;
		}
		.dropdown-menu .link-myspace:hover{
			color:black;
		}
	</style>
</head>
<body style="background:url('img/ba.png');background-size: auto;background-color: rgba(0,0,0,0.1);">
	<!-- 顶部导航 -->
	<div class="nav fixed-top">
		<div class="container">
			<div class="top-title"><span>OnlineJudge</span></div>
			<div class="top-list">
				<ul>
					<li class=""><a href="problem/list?pager.offset=0">题库</a></li>
					<li class="active1"><a href="solution/list?pager.offset=0">题解</a></li>
					<li class=""><a href="community/list?pager.offset=0">论坛</a></li>
				</ul>
			</div>
			<div class="top-last">
				<c:if test="${currentUser!=null }">
					<a href="user/myspace" class="dropdown-toggle" data-toggle="dropdown">
	                    <img class="img-circle" src="${pageContext.request.contextPath }/img/${currentUser.getUserImg() }" style="margin: -5px;" width="35px">
	                    &nbsp;
	                    <strong id="id_user_username">${currentUser.getUserName() }</strong>
	                    <b class="caret"></b>
                	</a>
                	<ul class="dropdown-menu" style="width:50px;margin-top:16px;font-size: 13px;text-align: center">
                		<li style="padding: 0;"><hr style="margin:0;"><a class="link-myspace" href="user/myspace" style="font-size:14px;">个人中心</a></li>
                		<li style="padding: 0;"><hr style="margin:0;"><a class="btn btn-outline-primary btn-lg btn-block" role="button" href="user/logout" style="font-size:14px;">退出登录</a></li>
                    </ul>
				</c:if>
				<!-- 
				<c:if test="${currentUser==null }">
					<a href="javascript:void(0);" onclick="syalert.syopen('alert1')">登录/注册</a>
				</c:if>
				 -->
			</div>
		</div>
	</div>

	<!-- 内容 -->
	<div class="container" style="margin-top: 70px;">
		<div class="panel panel-default">
			<div class="panel-body">
				<h2 style="margin-top: 10px;">
					${problem.getProblemId() }.${problem.getProblemTitle() }&nbsp;&nbsp;
					<a href="problem/item?problemId=${problem.getProblemId() }" class="label-info label" style="font-size: 14px;font-weight: normal;text-decoration: none;color: white;">原题链接</a>
					&nbsp;&nbsp;
				</h2>
				<hr>
				<pre>
				<code class="language-java" id="code" style="font-size: 16px;">${problem.getSuccessCode() }</code>
				</pre>
			</div>
		</div>
	</div>
	<script type="text/javascript">
		hljs.initHighlightingOnLoad();
	</script>
</body>
</html>